﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RequirementAndBug.Common.Entities
{
    /// <summary>
    /// 结果返回类
    /// </summary>
    public class ResultInfo
    {
        /// <summary>
        /// 结果编号：小于等于零一律失败，正整数成功
        /// </summary>
        public int Code
        {
            get;
            set;
        }
        /// <summary>
        /// 结果描述
        /// </summary>
        public string Msg
        {
            get;
            set;
        }
        /// <summary>
        /// 成功后携带返回数据，失败返回Null
        /// </summary>
        public object Data
        {
            get;
            set;
        }

        public ResultInfo()
        { }

        public ResultInfo(int code, string msg, object data)
        {
            this.Code = code;
            this.Msg = msg;
            this.Data = data;
        }
        public ResultInfo(int code, string msg)
        {
            this.Code = code;
            this.Msg = msg;
            this.Data = null;
        }



    }
}
